package com.by.controller;

import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author Ye QS
 * @version 0.1
 * @className DictController
 * @description
 * @date 2024/9/14 16:50
 * @since jdk11
 */
@RestController
@RequestMapping("/v1")
@Api(tags = "字典管理")
public class DictController extends BaseController {
    @Autowired
    DictService dictService;

    @ApiOperation("字典配置")

    @GetMapping("/dict/type")
    public ResultBean queryDict(@RequestParam(name = "type", required = true) String type) {
        List<Map> list = dictService.queryDict(type);
        return success("字典配置", list);
    }
}
